<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link
            href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"
            rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>员工列表————显示所有员工</small>
                </h1>
            </div>
        </div>


        <div class="row">
            <div class="col-md-4 column">
                <a th:href="@{/employee/addemployee}"
                   class="btn btn-primary">添加员工</a>
                <a href="${pageContext.request.contextPath}/book/allbook"
                   class="btn btn-primary">全部员工</a>
            </div>


            <div class="col-md-6 column">
                <form action="${pageContext.request.contextPath}/book/querybookname" method="post" class="form-inline">
                    <input type="text" name="bookname" class="form-control" placeholder="查询员工的名字">
                    <input type="submit" value="查询" class="btn btn-primary"  style="display: inline-block " width="50">
                </form>
            </div>

        </div>

        <span style="color: #ff0000; font-size: 16px">${err}</span>
        <div class="row clearfix">
            <div class="col-md-12 column">
                <table class="table table-hover tablle-striped">
                    <thead>
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>年龄</th>
                        <th>生日</th>
                        <th>底薪</th>
                        <th>补助</th>
                        <th>电话</th>
                        <th>照片</th>
                        <th>电话</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each ="u : ${list}">
                        <td th:text = "${u.employee_code}">
                        <td th:text = "${u.employee_name}">
                        <td th:text = "${u.employee_gender}">
                        <td th:text = "${u.employee_age}">
                        <td th:text = "${u.employee_birth}">
                        <td th:text = "${u.employee_salary}">
                        <td th:text = "${u.employee_subsidy}">
                        <td th:text = "${u.employee_telephone}">
                        <td th:text = "@{u.employy_photo}">
                        <td th:text = "${u.employy_ide}">

                        <td><a href="${pageContext.request.contextPath}/book/toupdatebook?id=${b.bookid}">修改</a>
                            &nbsp;|&nbsp;
                            <a th:href="@{/employee/delemloyee/{deleteEmployeeByCode}(deleteEmployeeByCode=${u.employee_code})}">删除</a>
                        </td>
                        <!-- /book/toupdatebook?id=${b.bookid} -->
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="ui success  message" th:unless="${#strings.isEmpty(message)}">
        <i class="close icon"></i>
        <div class="header">提示：</div>
        <p th:text="${message}"></p>
    </div>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script>
    $(".message .close").on('click',function () {
        $(this).closest(".message")
            .transition("fade");
    })
</script>
</body>
</html>